package com.mykotlin

import android.os.Bundle
import android.widget.TextView
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity

class MainActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        enableEdgeToEdge()
        setContentView(R.layout.activity_main)
        val textView = findViewById<TextView>(R.id.textView)
        val button = findViewById<TextView>(R.id.button)
        textView.text = "Hello World!"
        button.setOnClickListener {
            textView.text = "你点击了按钮"
        }

    }

    override fun onDestroy() {
        super.onDestroy()
    }
}